package com.douyin.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
@TableName("recommendation_cache")
@Accessors(chain = true) // 添加这个注解
public class RecommendationCache {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("user_id")
    private Long userId;

    @TableField("video_id")
    private Long videoId;

    @TableField("rank")
    private Integer rank;

    @TableField("score")
    private BigDecimal score;

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField("expired_at")
    private LocalDateTime expiredAt;
}
